package Upr;

public class ClassTaskBubbleSort {

	public static void main(String[] args) 
	{
		int [] arr = {7,1,9,2,6,5,0,5,7,9,63,45,564,654,21};
		
		printSortArray(arr);
		
	}

	public static void printSortArray( int[] arr)
	{
		
		
		int save = 0;
		
		
		for(int i = 0; i <arr.length; i++)
		{
			
			boolean sorted = true;
			for(int j = 0; j < arr.length-(i+1); j++)
			{
				
				if ( arr[j] > arr[j+1]) 
				{
					save = arr[j];
					arr[j] = arr[j+1];
					arr[j+1] = save;
					sorted = false;
				}
				
			}
		
		}

		
		for(int i = 0; i<arr.length; i++)
		{
			System.out.print(arr[i] + "  ");
			
		}
		
	}
	
	
	
	
	
	
	
}
